home *** CD-ROM | disk | FTP | other *** search
- 10 'Text Conversion V1.1 by B.E. Hanscom CIS 73765,1252
- 20 on error goto 280
- 30 lf$=chr$(10):cr$=chr$(13):sp$=chr$(32):ssp$=chr$(30)
- 40 fullw 2 : clearw 2 :gotoxy 1,1
- 50 ?"Text file conversion for compatability with First Word"
- 60 ?:?"The file created will contain ''variable spaces'' ($1E)"
- 70 ?"in place of ''fixed spaces'' ($20).":?:?
- 80 ?"Hit RETURN at Source Filename to exit":?:?
- 90 'GET SOURCE FILENAME
- 100 input "Source Filename.EXT (RETURN to EXIT) ";s$
- 110 if len(s$)=0 then end
- 120 open "I",#1,s$
- 130 'GET DESTINATION FILENAME
- 140 ?
- 150 input "Destination Filename.EXT ";d$ :error 0
- 160 open "I",#2,d$ : close 2 : ow$="y"
- 170 if err<>53 then ?chr$(7):?"File exists ... Overwrite (y/n)";:input ow$
- 180 if ow$<>"Y" and ow$<>"y" then 130
- 190 open "O",#2,d$
- 200 line input#1,i$
- 210 if len(i$)=0 then 200
- 220 for a=1 to len(i$) : if mid$(i$,a,1)=sp$ then mid$(i$,a,1)=ssp$
- 230 next
- 240 if right$(i$,1)=lf$ then i$=left$(i$,len(i$)-1)
- 250 if left$(i$,1)=lf$ then i$=right$(i$,len(i$)-1)
- 260 print# 2,i$;ssp$
- 270 goto 200
- 280 'Error handling routine
- 290 if erl=160 then resume next
- 295 if err=0 then resume next
- 300 ?:?chr$(7)
- 320 close
- 330 if err<51 or err>64 then ?"Error! #"err
- 340 if err=51 then ?"Device number invalid"
- 350 if err=52 then ?"File number or Filename invalid"
- 360 if err=53 then ?"File not found on disk specified"
- 370 if err=54 then ?"File mode is not valid"
- 380 if err=55 then ?"You cannot OPEN or KILL a file already open"
- 390 if err=57 then ?"Disk input/output error"
- 400 if err=61 then ?"Disk is full"
- 410 if err=62 then ?"Conversion complete!"
- 420 if err=64 then ?"Invalid Filename"
- 430 ?:?
- 440 resume 90
- ərrrrrrrrrrrrrr